package org.acghub.config.confbean.person;

import org.acghub.config.TableFieldAnno;
import org.acghub.config.TableClassAnno;

@TableClassAnno
public final class SPerson extends org.acghub.config.AbstractConf<Integer> {

    /**
     * 模版ID
     */
    @TableFieldAnno(index=0, name="id", type="int", delimiters="")
    private Integer id = 0;

    /**
     * 人物名称
     */
    @TableFieldAnno(index=1, name="name", type="string", delimiters="")
    private String name = "";

    /**
     * 人物类型
     */
    @TableFieldAnno(index=2, name="type", type="int", delimiters="")
    private Integer type = 0;

    /**
     * 人物标签
     */
    @TableFieldAnno(index=3, name="tags", type="list<string>", delimiters="|")
    private java.util.List<String> tags = new java.util.ArrayList<>();

    /**
     * 人物属性
     */
    @TableFieldAnno(index=4, name="props", type="map<string,string>", delimiters="|:")
    private java.util.Map<String, String> props = new java.util.HashMap<>();

    /**
     * 战力
     */
    @TableFieldAnno(index=5, name="power", type="long", delimiters="")
    private Long power = 0L;

    /**
     * 维度
     */
    @TableFieldAnno(index=6, name="lat", type="double", delimiters="")
    private Double lat = .0D;

    /**
     * 经度
     */
    @TableFieldAnno(index=7, name="lng", type="double", delimiters="")
    private Double lng = .0D;

    /**
     * 好友id集合
     */
    @TableFieldAnno(index=8, name="friends", type="set<int>", delimiters=",")
    private java.util.Set<Integer> friends = new java.util.HashSet<>();

    /**
     * 登录奖励
     */
    @TableFieldAnno(index=9, name="loginAwards", type="list<reward>", delimiters="|,")
    private java.util.List<org.acghub.config.Reward> loginAwards = new java.util.ArrayList<>();

    /**
     * 隐藏福利大奖
     */
    @TableFieldAnno(index=10, name="bigAward", type="reward", delimiters=",")
    private org.acghub.config.Reward bigAward = null;

    /**
     * 额外信息
     */
    @TableFieldAnno(index=11, name="extra", type="list2<string>", delimiters="|,")
    private java.util.List<java.util.List<String>> extra = new java.util.ArrayList<>();

    /**
     * 出生日期
     */
    @TableFieldAnno(index=12, name="birthday", type="date", delimiters="yyyy-MM-dd HH:mm:ss")
    private java.time.LocalDateTime birthday = null;

    /**
     * 是否已婚
     */
    @TableFieldAnno(index=13, name="married", type="bool", delimiters="")
    private Boolean married = false;

    public SPerson() {

    }

    public Integer getId() {
        return this.id;
    }

    public SPerson setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return this.name;
    }

    public SPerson setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getType() {
        return this.type;
    }

    public SPerson setType(Integer type) {
        this.type = type;
        return this;
    }

    public java.util.List<String> getTags() {
        return this.tags;
    }

    public SPerson setTags(java.util.List<String> tags) {
        this.tags = tags;
        return this;
    }

    public java.util.Map<String, String> getProps() {
        return this.props;
    }

    public SPerson setProps(java.util.Map<String, String> props) {
        this.props = props;
        return this;
    }

    public Long getPower() {
        return this.power;
    }

    public SPerson setPower(Long power) {
        this.power = power;
        return this;
    }

    public Double getLat() {
        return this.lat;
    }

    public SPerson setLat(Double lat) {
        this.lat = lat;
        return this;
    }

    public Double getLng() {
        return this.lng;
    }

    public SPerson setLng(Double lng) {
        this.lng = lng;
        return this;
    }

    public java.util.Set<Integer> getFriends() {
        return this.friends;
    }

    public SPerson setFriends(java.util.Set<Integer> friends) {
        this.friends = friends;
        return this;
    }

    public java.util.List<org.acghub.config.Reward> getLoginAwards() {
        return this.loginAwards;
    }

    public SPerson setLoginAwards(java.util.List<org.acghub.config.Reward> loginAwards) {
        this.loginAwards = loginAwards;
        return this;
    }

    public org.acghub.config.Reward getBigAward() {
        return this.bigAward;
    }

    public SPerson setBigAward(org.acghub.config.Reward bigAward) {
        this.bigAward = bigAward;
        return this;
    }

    public java.util.List<java.util.List<String>> getExtra() {
        return this.extra;
    }

    public SPerson setExtra(java.util.List<java.util.List<String>> extra) {
        this.extra = extra;
        return this;
    }

    public java.time.LocalDateTime getBirthday() {
        return this.birthday;
    }

    public SPerson setBirthday(java.time.LocalDateTime birthday) {
        this.birthday = birthday;
        return this;
    }

    public Boolean getMarried() {
        return this.married;
    }

    public SPerson setMarried(Boolean married) {
        this.married = married;
        return this;
    }

    public String toString() {
        return "SPerson {\n" +
            "    id = " + id + "\n" +
            "    name = " + name + "\n" +
            "    type = " + type + "\n" +
            "    tags = " + tags + "\n" +
            "    props = " + props + "\n" +
            "    power = " + power + "\n" +
            "    lat = " + lat + "\n" +
            "    lng = " + lng + "\n" +
            "    friends = " + friends + "\n" +
            "    loginAwards = " + loginAwards + "\n" +
            "    bigAward = " + bigAward + "\n" +
            "    extra = " + extra + "\n" +
            "    birthday = " + birthday + "\n" +
            "    married = " + married + "\n" +
            "}";
    }

    @Override
    public int hashCode() {
        int result = 0;
        result = 31 * result + id.hashCode();
        result = 31 * result + name.hashCode();
        result = 31 * result + type.hashCode();
        result = 31 * result + tags.hashCode();
        result = 31 * result + props.hashCode();
        result = 31 * result + power.hashCode();
        result = 31 * result + lat.hashCode();
        result = 31 * result + lng.hashCode();
        result = 31 * result + friends.hashCode();
        result = 31 * result + loginAwards.hashCode();
        result = 31 * result + bigAward.hashCode();
        result = 31 * result + extra.hashCode();
        result = 31 * result + birthday.hashCode();
        result = 31 * result + married.hashCode();
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SPerson that = (SPerson) o;
        if (!java.util.Objects.equals(id, that.id)) {
            return false;
        }
        if (!java.util.Objects.equals(name, that.name)) {
            return false;
        }
        if (!java.util.Objects.equals(type, that.type)) {
            return false;
        }
        if (!java.util.Objects.equals(tags, that.tags)) {
            return false;
        }
        if (!java.util.Objects.equals(props, that.props)) {
            return false;
        }
        if (!java.util.Objects.equals(power, that.power)) {
            return false;
        }
        if (!java.util.Objects.equals(lat, that.lat)) {
            return false;
        }
        if (!java.util.Objects.equals(lng, that.lng)) {
            return false;
        }
        if (!java.util.Objects.equals(friends, that.friends)) {
            return false;
        }
        if (!java.util.Objects.equals(loginAwards, that.loginAwards)) {
            return false;
        }
        if (!java.util.Objects.equals(bigAward, that.bigAward)) {
            return false;
        }
        if (!java.util.Objects.equals(extra, that.extra)) {
            return false;
        }
        if (!java.util.Objects.equals(birthday, that.birthday)) {
            return false;
        }
        if (!java.util.Objects.equals(married, that.married)) {
            return false;
        }
        return true;
    }

}
